package com.fqgj.xjd.user.mapper;

import com.fqgj.xjd.user.entity.UserCreditCardBillEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List; /**
 * name:信用卡账单
 * auth:ting.li@qianli-inc.com
 * date:2018/1/16 10:29
 * version: v1.0.0
 **/
public interface UserCreditCardBillMapper {
    /**
     * 批量插入账单
     * @param entities
     */
    void batchInsert(@Param("entities") List<UserCreditCardBillEntity> entities);

    void insert(UserCreditCardBillEntity entity);

    void updateByPrimaryKey(UserCreditCardBillEntity entity);
    /**
     * 查询该用户所有信用卡最新账单记录
     * @param userCode
     * @return
     */
    List<UserCreditCardBillEntity> selectAllLatestBill(String userCode);

    /***
     *  分页查询过期账单
     * @param start
     * @param pageSize
     * @return
     */
    List<UserCreditCardBillEntity> pagedQueryExpiredCreditCardBills(@Param("start") Integer start, @Param("pageSize") Integer pageSize);
}
